plugins {
    id 'base'
    id 'org.springframework.boot' version '3.2.3'
    id 'io.spring.dependency-management' version '1.1.4'
}

allprojects {
    apply {
        plugin('java')
        plugin('java-library')
        plugin('org.springframework.boot')
        plugin('io.spring.dependency-management')
    }

    repositories {
        mavenCentral()
    }

    ext {
        nimbusJwt = '9.31'
        modelMapperVersion = '3.2.0'
        swagerVersion = '2.5.0'
    }

    dependencies {
        compileOnly 'org.projectlombok:lombok'
        annotationProcessor 'org.projectlombok:lombok'
    }

    dependencies {
        implementation "com.nimbusds:nimbus-jose-jwt:${nimbusJwt}"
        implementation "org.modelmapper:modelmapper:${modelMapperVersion}"
        implementation 'org.liquibase:liquibase-core'
    }

    dependencies {
        developmentOnly 'org.springframework.boot:spring-boot-devtools'
        implementation 'org.springframework.kafka:spring-kafka'
        implementation 'org.springframework.boot:spring-boot-starter-security'
        implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
        implementation 'org.springframework.boot:spring-boot-starter-web'
        implementation 'org.springframework.boot:spring-boot-starter-validation'
        implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
        implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${swagerVersion}"
    }

    dependencies {
        testImplementation 'org.springframework.security:spring-security-test'
        testImplementation 'org.springframework.boot:spring-boot-starter-test'
        testImplementation 'org.springframework.graphql:spring-graphql-test'
        testImplementation 'org.springframework.kafka:spring-kafka-test'
        testImplementation 'org.testcontainers:postgresql'
    }
}